<template>
	<view class="recommend">
		<view class="status_bar">
			<!-- 这里是状态栏 -->
		</view>
		<view class="navTitle">
			<view>
				<text>分类</text>
				<img src="~/static/icon/search.png" @tap="search">
			</view>
			
		</view>

		<view class="content">
			<uni-grid :column="3" :show-border="false" :square="false" >
				<uni-grid-item>
					<navigator url="/pages/list/list">
					<img src="~/static/icon/rank.png">
					<text class="text">榜单</text>
					</navigator>
				</uni-grid-item>
				<uni-grid-item>
					<navigator url="/pages/index/index" open-type="switchTab" hover-class="none">
					<img src="~/static/icon/recom.png">
					<text class="text">推荐</text>
					</navigator>
				</uni-grid-item>
				<uni-grid-item>
					<navigator url="/pages/movie/movie?typeid1=2&typeid=0&index=-1" hover-class="none">
					<img src="~/static/icon/drama.png">
					<text class="text">电视剧</text>
					</navigator>
				</uni-grid-item>
				<uni-grid-item>
					<navigator url="/pages/movie/movie?typeid1=1&typeid=0&index=-1" hover-class="none">
					<img src="~/static/icon/movie.png">
					<text class="text">电影</text>
					</navigator>
				</uni-grid-item>
				<uni-grid-item>
					<navigator url="/pages/movie/movie?typeid1=3&typeid=0&index=-1" hover-class="none">
					<img src="~/static/icon/variety.png">
					<text class="text">综艺</text>
					</navigator>
				</uni-grid-item>
				<uni-grid-item>
					<navigator url="/pages/movie/movie?typeid1=4&typeid=0&index=-1" hover-class="none">
					<img src="~/static/icon/comic.png">
					<text class="text">动漫</text>
					</navigator>
				</uni-grid-item>
			</uni-grid>
		</view>
	</view>
</template>

<script>
	import uniGrid from "@/components/uni-grid/uni-grid.vue"
	import uniGridItem from "@/components/uni-grid-item/uni-grid-item.vue"
	export default {
		components: {
			uniGrid,
			uniGridItem
		},
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			rank(e) {
				if (e.detail.index == 0) {
					uni.navigateTo({
						url: "/pages/list/list",
					});
				}
				if (e.detail.index == 1) {
					uni.switchTab({
						url: "/pages/index/index",
					});
				}
				if (e.detail.index == 2) {
					uni.navigateTo({
						url: "/pages/drama/drama",
					});
				}
				if (e.detail.index == 3) {
					uni.navigateTo({
						url: "/pages/movie/movie",
					});
				}
				if (e.detail.index == 4) {
					uni.navigateTo({
						url: "/pages/variety/variety",
					});
				}
				if (e.detail.index == 5) {
					uni.navigateTo({
						url: "/pages/comic/comic",
					});
				}
			},
			search() {
				uni.navigateTo({
					url: "/pages/search/search",
				});
			}
		}
	}
</script>

<style>
	@import url("classes.css");
</style>
